#ifndef __TASK_QUEUE__
#define __TASK_QUEUE__

#include<func.h>

typedef struct task_s
{
    int netfd;
    struct task_s *next;
}task_t;

typedef struct taskQueue_s
{
    task_t *head;
    task_t *tail;
    int queue_size;
    pthread_mutex_t mutex;
    pthread_cond_t cond;
}taskQueue_t;

//API 
int queueInit(taskQueue_t *queue);
int enqueue(taskQueue_t *queue,int netfd);
int dequeue(taskQueue_t *queue);

#endif
